package com.stagewebserver.webserver.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.stagecommon.common.vo.OrdersVo;
import com.stagecommon.common.pojo.Orders;


import java.time.LocalDateTime;
import java.util.List;

public interface OrdersMapper extends BaseMapper<Orders> {

    List<OrdersVo> selectOrdersByUsername(String username);

    OrdersVo selectOrderByOrderNum(String orderNum);

    /**
     * 修改订单状态
     * @param status
     * @param orderId
     * @return
     */
    int updateStatus(Byte status, Long orderId);

    /**
     * 修改订单的文件名称
     * @param filename
     * @param orderNum
     * @return
     */
    int updateFilename(String filename, String orderNum);

    /**
     * 修改订单支付时间
     * @param orderId
     * @return
     */
    int updatePayTime(Long orderId);

    Integer selectDemandId(Long orderId);

    OrdersVo selectOrderById(Long orderId);

}
